import { Column, Entity } from 'typeorm'
import { SoftCommonEntity } from '~/common/entity/common.entity'

@Entity({ name: 'c_student_class' })
export class StudentClassEntity extends SoftCommonEntity {
  @Column({ name: 'student_id' })
  studentId: number

  @Column({ name: 'class_id' })
  classId: number

  @Column({ name: 'join_at', type: 'datetime', nullable: true })
  joinAt: Date
  
  @Column({ name: 'checkin_days', type: 'int', default: 0, comment: '打卡天数' })
  checkinDays: number
  
  @Column({ name: 'last_checkin_at', type: 'datetime', nullable: true, comment: '上次打卡时间' })
  lastCheckinAt: Date
}
